*********************************************************************************
*** Table 1
*********************************************************************************

* Project: 	International threats and European defense
* Authors: 	Matthias Mader
* Date:		March 2023	

* Data: VW Project, Pane-European survey (W1)

*********************************************************************************

*** Setup

	clear
	set more off            						// Disable partitioned output
	set dp period									// Use comma instead of dot for decimals
	set linesize 80         						// Line size limit to make output more readable
	macro drop _all         						// clear all macros
	set scheme plotplainblind, permanent				// set graph scheme, e.g., cleanplots, plottig, plotplainblind, burd3, s1mono
	graph set window fontface "Times New Roman"		// set font in graphs | "Arial" | "Times New Roman"


*** Table 1
	
	use DATA_clean, clear

	*Row 1
	reg csdp_wouldlike c.threat_ind2##i.idconfig2 i.QCOUNTRY female age ib2.education iso comp mili
	margins, dydx(threat_ind2)
	margins, dydx(threat_ind2) at(idconfig=(1 2))
	*Column 4, row 1: Interaction term (c.threat_ind2#c.feel_EU) in regression table

	*** Rows 2, 3
	reg csdp_wouldlike c.threat_ind2##i.idconfig2##c.quizr i.QCOUNTRY female age i.education iso comp mili
	margins, dydx(threat_ind2) at(quiz=(1 0))
	margins, dydx(threat_ind2) at(idconfig=(1 2) quiz=(1))
	margins, dydx(threat_ind2) at(idconfig=(1 2) quiz=(0))

